<%--
  Created by IntelliJ IDEA.
  User: 李元峰
  Date: 2022/10/3
  Time: 15:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set value="${pageContext.request.contextPath}" var="path"></c:set>
<!DOCTYPE HTML>
<div class="row">
    <c:forEach items="${requestScope.pageInfo.list}" var="company">
        <div class="col-md-6 col-lg-12 col-xl-6 col-xxl-4 pxp-companies-card-1-container">
            <div class="pxp-companies-card-1 pxp-has-border">
                <div class="pxp-companies-card-1-top">
                    <a href="/web/personal/personalCompanyDetail/${company.id}" class="pxp-companies-card-1-company-logo" style="background-image: url(${path}/static/web/images/${company.companyLogo});"></a>
                    <a href="/web/personal/personalCompanyDetail/${company.id}" class="pxp-companies-card-1-company-name">${company.name}</a>
                    <div class="pxp-companies-card-1-company-description pxp-text-light" style="overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">${company.introduction}</div>
                </div>
                <div class="pxp-companies-card-1-bottom">
                    <a href="/web/personal/positionList?positionName=${company.name}" class="pxp-companies-card-1-company-jobs">${company.positionCount} 个职位在招</a>
                    <a href="/web/personal/personalCompanyDetail/${company.id}" class="btn rounded-pill pxp-card-btn" style="margin-left: 80px;">公司详情 ></a>
                </div>
            </div>
        </div>
    </c:forEach>
</div>

<div class="row mt-4 mt-lg-5 justify-content-between align-items-center">
    <div class="col-auto">
        <nav class="mt-3 mt-sm-0" aria-label="Companies pagination" style="text-align: center;">
            <ul class="pagination pxp-pagination" style="margin-left: 330px;">
                <li class="page-item" aria-current="page">
                    <a href="#" class="page-link preNum">上一页</a>
                </li>
                <c:forEach items="${requestScope.pageInfo.navigatepageNums}" var="i">
                    <c:if test="${i==requestScope.pageInfo.pageNum}" var="en">
                        <li class="page-item active" aria-current="page">
                            <span class="page-link updatePage">${i}</span>
                        </li>
                    </c:if>
                    <c:if test="${not en}">
                        <li class="page-item"><a class="page-link updatePage" href="javascript:void(0);">${i}</a></li>
                    </c:if>
                </c:forEach>
                <li class="page-item" aria-current="page">
                    <a href="#" class="page-link nextNum">下一页</a>
                </li>
            </ul>
        </nav>
    </div>
</div>
<input type="hidden" value="${requestScope.pageInfo.total}" id="company-count">
<input type="hidden" value="${requestScope.pageInfo.pageNum}" id="nowPage">